package com.newstart.timetask.project.utils.timeTask;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * Created by Administrator on 2017/9/29.
 */
public class RankTaskListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        System.out.println("开启监听了.9点30准时启动...........");
        String day = "1";
        String hour = "15";
        String minute = "47";
        new TaskManager().startTask(new RankTask(), Integer.parseInt(day), Integer.parseInt(hour), Integer.parseInt(minute));
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
    }
}
